/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link contact}.
 * </p>
 *
 * @author Cedric Nana
 * @see contact
 * @generated
 */
public class contactWrapper implements contact, ModelWrapper<contact> {
	public contactWrapper(contact contact) {
		_contact = contact;
	}

	@Override
	public Class<?> getModelClass() {
		return contact.class;
	}

	@Override
	public String getModelClassName() {
		return contact.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("message_id", getMessage_id());
		attributes.put("user_id", getUser_id());
		attributes.put("datetime", getDatetime());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long message_id = (Long)attributes.get("message_id");

		if (message_id != null) {
			setMessage_id(message_id);
		}

		Long user_id = (Long)attributes.get("user_id");

		if (user_id != null) {
			setUser_id(user_id);
		}

		String datetime = (String)attributes.get("datetime");

		if (datetime != null) {
			setDatetime(datetime);
		}
	}

	/**
	* Returns the primary key of this contact.
	*
	* @return the primary key of this contact
	*/
	@Override
	public long getPrimaryKey() {
		return _contact.getPrimaryKey();
	}

	/**
	* Sets the primary key of this contact.
	*
	* @param primaryKey the primary key of this contact
	*/
	@Override
	public void setPrimaryKey(long primaryKey) {
		_contact.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the message_id of this contact.
	*
	* @return the message_id of this contact
	*/
	@Override
	public long getMessage_id() {
		return _contact.getMessage_id();
	}

	/**
	* Sets the message_id of this contact.
	*
	* @param message_id the message_id of this contact
	*/
	@Override
	public void setMessage_id(long message_id) {
		_contact.setMessage_id(message_id);
	}

	/**
	* Returns the user_id of this contact.
	*
	* @return the user_id of this contact
	*/
	@Override
	public long getUser_id() {
		return _contact.getUser_id();
	}

	/**
	* Sets the user_id of this contact.
	*
	* @param user_id the user_id of this contact
	*/
	@Override
	public void setUser_id(long user_id) {
		_contact.setUser_id(user_id);
	}

	/**
	* Returns the datetime of this contact.
	*
	* @return the datetime of this contact
	*/
	@Override
	public java.lang.String getDatetime() {
		return _contact.getDatetime();
	}

	/**
	* Sets the datetime of this contact.
	*
	* @param datetime the datetime of this contact
	*/
	@Override
	public void setDatetime(java.lang.String datetime) {
		_contact.setDatetime(datetime);
	}

	@Override
	public boolean isNew() {
		return _contact.isNew();
	}

	@Override
	public void setNew(boolean n) {
		_contact.setNew(n);
	}

	@Override
	public boolean isCachedModel() {
		return _contact.isCachedModel();
	}

	@Override
	public void setCachedModel(boolean cachedModel) {
		_contact.setCachedModel(cachedModel);
	}

	@Override
	public boolean isEscapedModel() {
		return _contact.isEscapedModel();
	}

	@Override
	public java.io.Serializable getPrimaryKeyObj() {
		return _contact.getPrimaryKeyObj();
	}

	@Override
	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_contact.setPrimaryKeyObj(primaryKeyObj);
	}

	@Override
	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _contact.getExpandoBridge();
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.model.BaseModel<?> baseModel) {
		_contact.setExpandoBridgeAttributes(baseModel);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
		_contact.setExpandoBridgeAttributes(expandoBridge);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_contact.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new contactWrapper((contact)_contact.clone());
	}

	@Override
	public int compareTo(
		de.hsmannheim.pepa.patientenportal.apanwep.model.contact contact) {
		return _contact.compareTo(contact);
	}

	@Override
	public int hashCode() {
		return _contact.hashCode();
	}

	@Override
	public com.liferay.portal.model.CacheModel<de.hsmannheim.pepa.patientenportal.apanwep.model.contact> toCacheModel() {
		return _contact.toCacheModel();
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.contact toEscapedModel() {
		return new contactWrapper(_contact.toEscapedModel());
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.contact toUnescapedModel() {
		return new contactWrapper(_contact.toUnescapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _contact.toString();
	}

	@Override
	public java.lang.String toXmlString() {
		return _contact.toXmlString();
	}

	@Override
	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_contact.persist();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof contactWrapper)) {
			return false;
		}

		contactWrapper contactWrapper = (contactWrapper)obj;

		if (Validator.equals(_contact, contactWrapper._contact)) {
			return true;
		}

		return false;
	}

	/**
	 * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
	 */
	public contact getWrappedcontact() {
		return _contact;
	}

	@Override
	public contact getWrappedModel() {
		return _contact;
	}

	@Override
	public void resetOriginalValues() {
		_contact.resetOriginalValues();
	}

	private contact _contact;
}